<?php 
$sql="select * from tttj.applist order by id asc";
$query = exec_db($sql);
while($value = mysqli_fetch_assoc($query))
{
	$p_appid=$value['appid'];
	$p_appname=$value['appname'];

	$list[$p_appid] = $value;
}
$res=var_export($list,true);
$php=<<<code
<?php
\$arr_app=$res;
?>
code;
file_put_contents(S_ROOT.'source/data/applist.php',$php);

?>